home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The PC-SIG Library 10
/
The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso
/
PC_SIGCD
/
12
/
2
/
DISK1227.ZIP
/
TECHMAN.DOC
< prev
Wrap
Text File
|
1990-02-07
|
18KB
|
433 lines
ROKMAR ASSETS INVENTORY SYSTEM
Version 2.0
Technical Reference Manual
ROKMAR Computer Systems
Copyright (c) 1990
ROKMAR ASSETS INVENTORY SYSTEM
INDEX
Introduction ................ 1
Copyright Notice ............ 3
ASREPORT .................... 4
BASIC Reporting ............. 6
Data Dictionary ............. 8
Custom Help Windows ......... 9
Custom Report Menu .......... 10
Page 1
INTRODUCTION
This document describes the internal workings of the ROKMAR
Assets Inventory System and methods to customize the report
outputs.
The most user requested feature of any application is the ability
to create custom reports. Reports are one of the most important
and useful outputs from an application, and certainly one of the
most visible. The usefulness of the report can be degraded when
the report heading and field names are described in a generic
fashion using terms not used by the company. Most users want to
customize their reports and create business specific versions
that are immediately recognizable. This document will tell you
how to do just that.
This application is built over a relational database model. This
means that fields in files can be linked to fields in other
files. The fact that this system sits on a database allows us to
be able to extract data by field name without having to know
where that data is. A quick example would be to try this program:
Type: ASREPORT ASSETS ASSET_KEY DESC
The screen will display the data fields from the records from the
file ASSETS sorted by ASSET_KEY. We have written our first
report; see how simple this can be. This program and a list of
all the data fields are described later.
Page 2
INTRODUCTION (cont.)
There are two custom reporting methods available with this
system: the method described above using program ASREPORT, which
is a simple data lister; and a second method which allows
complete format control of the data. Any extraction and
formatting scheme is possible from printing small gum labels to
printing large 162 character wide reports to any printer type.
Method two requires some programming expertise or the desire to
fiddle around with some code. Since these reports are read only
from extracts, no harm to the database is possible, so you can
not hurt anything by tinkering.
Page 3
COPYRIGHT NOTICE
This software product is the copyrighted property of ROKMAR
Computer Systems, and the usual shareware limited agreement
applies:
1. No fee may be charged for the retail sale of this product
other than a reasonable copy and distribution charge.
2. This product may only be distributed in its original and
complete form, including documentation and copyright notice.
3. This product may not be distributed, whole or in any part as
a section or part of any commercial product without written
permission of ROKMAR COMPUTER SYSTEMS.
DISCLAIMER
ROKMAR Computer Systems, its owners, management, or associates
will not be liable for any damages or claims related in any way
to the use of this product and disclaims all warranties or
implied warranties by the distributor.
Page 4
ASREPORT PROGRAM
This program us useful for quick report lists to the screen, to a
printer or to an ASCII file that can be imported to any
spreadsheet or wordprocessor to create business statements.
This program is not incorporated into the application in general,
but runs under DOS. This program can be included into the custom
menu which is a part of the ASSETS custom report system in
general. The name of the program is ASREPORT.EXE.
The following descriptions will use the C> prompt. Don't be
confused if you are using a different disk drive and see
something else.
For a demonstration, type:
C>ASREPORT ASSETS
The entire list of records will scroll across your screen.
This is interesting if used as a browse of the data. Now try:
C>ASREPORT ASSETS ASSET_KEY DESC
Notice that only the data fields you selected, and in the order
you selected appear. Interesting? The format of this command is:
C>ASREPORT filename [file-element1 file-element2 ...]
The filename in this case is ASSETS.
The file elements are those listed in a later chapter and must be
spelled exactly. If the file elements are not used, all elements
will be extracted. If listed on the screen, the right most
elements will be truncated. Now lets print something:
C>ASREPORT ASSETS ASSET_TYPE DESC USER_DEF > PRN
Another way to do this would be:
C>ASREPORT ASSETS ASSET_TYPE DESC USER_DEF > myfile
C>COPY MYFILE PRN
The first method extracts the data and redirects the I/O to
the printing device. The second method extracts the data and
redirects the I/O into a file of your own choosing, then prints
the file.
Page 5
ASREPORT PROGRAM (cont.)
Why extract the data into another file?
This is one of the nicer features of this program. This file can
be imported into any spreadsheet, (Lotus 123, etc.), database, or
word processing program. The data may be used by the spreadsheet
program to be reformatted, sorted in other ways, or used for more
elaborate uses. A program may use this data to upload into other
databases or report the data in other formats. The data may be
included into a word processor for use inside a business report,
or for any other special purpose.
Page 6
BASIC REPORTING
This section describes a more elaborate reporting system. This
system is more complicated, but is without limitations in its
usage for reporting, extracting, etc.
This section is called BASIC reporting because it actually uses
the BASIC language distributed with every MS-DOS/PC-DOS operating
system. BASIC has all the power of any report writer program and
more. It is virtually as simple to use, but is not limited in
power as most every report writer programs available.
Report writing is typically composed of three parts:
1. Extraction: The data is read from the data files and written
to an ASCII file.
Extraction is done in ASSETS by a program similar to ASREPORT,
called EXTRACT. This program is used from DOS in the same way:
C>EXTRACT filename [file-element1 file-element2 ...]
2. Sorting: The ASCII file is then sorted in the order the
output is desired.
Sorting is then done by a sort program. DOS supplies a sort
program called SORT. The only problem with this program is that
it will only work with files small enough to fit into memory.
Sorting can be done with any sorting program available from
numerous sources. If your database is not too large, the DOS sort
will work fine. A typical example would be:
C>SORT <infile >outfile
Notice that in this case the sorting routine sorts the data in
the order that the elements are in the record. This means that
when extracting the data, you should list the elements to extract
by the extract program in the order you wish to sort by.
3. Output Formatting: The sorted ASCII file is then read and
written to the printer in some defined format. This can be done
with any language, but examples are supplies using BASIC.
The program should:
- Read in each record of data from the ASCII file.
- Either select or reject this record.
- Format the output report line with the data and write this line.
Any of the programs ending in .BAS are examples of report
programs.
Page 7
BASIC REPORTING (cont.)
Finally, all three of these steps should be placed into a .BAT
file as a packaged report program. This will require the use of a
text editor such as the DOS EDLIN program, or a word processor
which creates ASCII output files.
This .BAT file can then be run from the DOS prompt or placed
inside the custom reporting menu supplied with ASSETS.
Following is an example, the file name is SAMPRPT1.BAT:
REM ******************************************************
REM **** SAMPLE REPORT 1, SIMPLE LIST BY KEY *****
REM ******************************************************
ECHO OFF
EXTRACT ASSETS > TEMP.DAT
SORT <TEMP.DAT >TEMPSORT.DAT
GWBASIC SAMPRPT1
DEL TEMP.DAT
DEL TEMPSORT.DAT
Notice the three main parts of a report program: extraction,
sorting then formatting done here with GWBASIC. The BASIC program
used here is SAMPRPT1.BAS.
An example type of custom report might be:
The user defined field 1 has been defined by your company to be
the department responsible for the record. You will want a report
which lists all records by department, then by client, then by
record number.
EXTRACT ASSETS USER_DEF ASSET_KEY DESC
APPRAISAL DATE_PURCHASED > rptfile.tmp
SORT <rptfile.tmp >sortfile.tmp
GWBASIC MYRPT.BAS
DEL rptfile.tmp
DEL sortfile.tmp
The BASIC program could put your company's name on the heading
and describe the report as you use it. The field USER_DEF could
be called DEPARTMENT CODE (or whatever you wish).
You can even select only specific departments to print; in fact,
any selection criteria you wish is possible. There are no limits
at all imposed on a creative user.
Page 8
DATA DICTIONARY
The two data files are described here. For an in-depth
textual description of each field, refer to the help windows.
File ASSETS
Field Description Size Cobol Pic
----------------- --------------------------- ------ ---------
ASSET_KEY A unique key 5 X(5)
DESC The Description of the 25 X(25)
article of value.
TYPE The Type code. A category 8 X(8)
for the article, ie., tools,
equipment, etc.
LOCATION_STORED The Location Code where the 8 X(85)
article is stored, ie.,
garage, off-site, xa-01-01,
etc.
USER_DEFINED A User-Defined code for any 8 X(8)
special purpose requirement,
ie., persons name, sub-
breakdowns of Type or
Location, anything you wish.
DATE_PURCHASED The date the article was 6 X(6)
purchased. (MMDDYY)
PURCHASE_COST The purchase cost or value 7 9(5)v99
of the article. (characters)
PURCHASED_FROM Description of where the 25 X(25)
article was purchased from.
APPRAISAL The appraisal value, if 9 9(5)V99
applicable.
MODEL_NUMBER The article model number. 10 X(10)
SERIAL_NUMBER The article serial number. 20 X(20)
COMMENT1 First line of Comments. 50 X(50)
COMMENT2 Second line of Comments. 50 X(50)
Page 9
CUSTOM HELP WINDOWS
Be sure to make a copy of the original help file before altering
this file!
The help windows are also user customizable with any text editor.
Caution must be exercised here in that the windows follow a
special format. The format is :
<field > Must be 8 characters
Text
<next >
The last help window should be terminated with an <end>.
Refer to the current help window file distributed with the
system. This file is ASSETS.HLP.
The window automatically adjusts itself to the size of the text
created by the user. This does not mean that the text can be of
any size; any sentences going past the edge of the screen will be
truncated. This will not hurt anything, so if it happens, just
return and shorten the sentences of the help text.
Customizing this file can be helpful when a company is making
special uses of the fields provided. One example might be if the
user defined field #1 is used for a persons name. The help window
might become:
<user-def>
The enter the person's name that is
responsible for this record.
Be sure to left justify this field and
always type with caps on.
Page 10
CUSTOM REPORT MENU
Provided with the ROKMAR Records Management System is a menu
system to run any custom reports without leaving the ASSETS
system. This menu system is documented in a separate document:
CUSTMENU.DOC.
This menu system can be replaced by any other menu system the
user might feel more comfortable with. When the user selects the
custom reports menu from the main ASSETS pull-down menu, the
ASSETS system simply executes an external DOS command. The
command that ASSETS performs is "CUSTMENU". Since the menu system
supplied with this system is CUSTMENU.EXE, this program is run.
The command that ASSETS does is equivalent to doing:
C>CUSTMENU
This means that any program or .BAT file called CUSTMENU could be
run instead. To install another menu system, create a .BAT file
called CUSTMENU.BAT which runs your favorite menu program and
remove the CUSTMENU.EXE program from the directory. Then load all
your report programs that you have into your menu. Commands that
you might also place here are programs to backup your data, etc.